package cn.shop.cloud.web.cotroller;

import cn.shop.cloud.common.Result;
import cn.shop.cloud.domain.Good;
import cn.shop.cloud.feign.GoodFeignApi;
import cn.shop.cloud.service.IGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: shop-parent
 * @ClassName GoodFeignClient
 * @description:
 * @author: Mokio
 * @create: 2024−12-24 20:42
 * @Version 2024 2.2 ; jdk1.8.0_181
 **/
@RestController
public class GoodFeignClient implements GoodFeignApi {

    @Autowired
    private IGoodService goodService;

    @Override
    public Result<List<Good>> queryByIds(List<Long> ids) {
        //查询  全部的数据  根据传过来的 ids
        List<Good> goodList= goodService.queryByIds(ids);
        return Result.success(goodList);
    }
}

